﻿/* -------------------------------------------------------
   BASIT AJAZ PORTFOLIO — MASTER STYLESHEET
   Structure: Variables ? Reset ? Base ? Components ? Sections ? Responsive
   ------------------------------------------------------- */

/* --------------------------------------------------------
   1. CSS VARIABLES — DESIGN TOKENS
-------------------------------------------------------- */
:root {
  /* === LIGHT MODE COLORS === */
  --bg-primary:     #f0f4ff;
  --bg-secondary:   #ffffff;
  --bg-card:        rgba(255, 255, 255, 0.82);
  --bg-card-hover:  #f7f9ff;
  --bg-glass:       rgba(255,255,255,0.7);
  --bg-glass-dark:  rgba(255,255,255,0.45);

  --text-primary:   #0d1a36;
  --text-secondary: #4a5568;
  --text-muted:     #8896a4;

  --accent-1:       #2563eb;
  --accent-2:       #0891b2;
  --accent-3:       #7c3aed;
  --accent-4:       rgba(37, 99, 235, 0.08);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --accent-glow:    rgba(37, 99, 235, 0.12);

  --border:         rgba(37, 99, 235, 0.12);
  --border-card:    rgba(0, 0, 0, 0.07);
  --shadow-sm:      0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md:      0 10px 26px rgba(15, 23, 42, 0.08);
  --shadow-lg:      0 18px 42px rgba(15, 23, 42, 0.10);
  --shadow-xl:      0 28px 60px rgba(15, 23, 42, 0.12);

  /* Hero blobs */
  --blob-1: rgba(37, 99, 235, 0.08);
  --blob-2: rgba(8, 145, 178, 0.07);

  /* Navbar */
  --nav-bg: rgba(240, 244, 255, 0.85);
  --nav-border: rgba(37, 99, 235, 0.12);

  /* Skill bar track */
  --track-bg: rgba(37, 99, 235, 0.1);

  /* Section label */
  --label-bg: rgba(37, 99, 235, 0.08);
  --label-color: #2563eb;

  /* === SPACING SYSTEM (8px grid) === */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 28px;
  --sp-5: 36px;
  --sp-6: 44px;
  --sp-8: 64px;
  --sp-10: 80px;
  --sp-12: 96px;
  --sp-16: 128px;
  --section-space: clamp(48px, 6vw, 72px);
  --section-gap: clamp(22px, 3vw, 36px);
  --content-gap: clamp(18px, 2.5vw, 28px);

  /* === TYPOGRAPHY === */
  --font-body:    'Inter', sans-serif;
  --font-display: 'Poppins', sans-serif;

  /* === BORDER RADIUS === */
  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  32px;
  --r-full: 9999px;

  /* === TRANSITIONS === */
  --t-fast:   0.15s ease;
  --t-base:   0.25s ease;
  --t-slow:   0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --t-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- DARK MODE OVERRIDES ----------------------------- */
[data-theme="dark"] {
  --bg-primary:     #0b1426;
  --bg-secondary:   #101d33;
  --bg-card:        #14243d;
  --bg-card-hover:  #1a2d49;
  --bg-glass:       rgba(16, 29, 51, 0.88);
  --bg-glass-dark:  rgba(11, 20, 38, 0.78);

  --text-primary:   #f1f5f9;
  --text-secondary: #a8b8ce;
  --text-muted:     #93a4bd;

  --accent-1:       #3b82f6;
  --accent-2:       #22c7e8;
  --accent-3:       #a78bfa;
  --accent-4:       rgba(59, 130, 246, 0.12);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #22c7e8 100%);
  --accent-glow:    rgba(34, 199, 232, 0.10);

  --border:         rgba(59, 130, 246, 0.28);
  --border-card:    rgba(148, 163, 184, 0.18);
  --shadow-sm:      0 4px 14px rgba(0, 0, 0, 0.16);
  --shadow-md:      0 10px 26px rgba(0, 0, 0, 0.20);
  --shadow-lg:      0 18px 42px rgba(0, 0, 0, 0.24);
  --shadow-xl:      0 28px 60px rgba(0, 0, 0, 0.30);

  --blob-1: rgba(59, 130, 246, 0.06);
  --blob-2: rgba(34, 199, 232, 0.05);

  --nav-bg: rgba(11, 20, 38, 0.92);
  --nav-border: rgba(59, 130, 246, 0.2);

  --track-bg: rgba(148, 163, 184, 0.16);

  --label-bg: rgba(34, 199, 232, 0.12);
  --label-color: #7dd3fc;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 34%),
    radial-gradient(circle at top right, rgba(34, 199, 232, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%);
}

/* --------------------------------------------------------
   2. RESET & BASE
-------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background var(--t-slow), color var(--t-slow);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(8, 145, 178, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 38%);
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* -- INITIAL LOADING SCREEN ------------------------------ */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: var(--bg-primary);
  color: var(--text-primary);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
  animation: siteLoaderExit 1.08s ease forwards;
}
.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
html.loader-active,
body.loader-active { overflow: hidden; }
.site-loader__content {
  text-align: center;
  animation: siteLoaderLogo 1.08s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.site-loader__logo {
  display: block;
  width: clamp(82px, 18vw, 128px);
  height: auto;
  opacity: 1;
}
@keyframes siteLoaderLogo {
  0% { opacity: 0; transform: translateY(24px); }
  25% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes siteLoaderExit {
  0%, 72% { opacity: 1; visibility: visible; pointer-events: auto; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-loader { transition: none; }
  .site-loader { animation: none; }
  .site-loader__content { animation: none; }
  .site-loader__logo { opacity: 1; }
}

/* --------------------------------------------------------
   3. UTILITIES
-------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

.section {
  padding-block: var(--section-space);
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: var(--section-gap);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--label-bg);
  color: var(--label-color);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  margin-bottom: var(--sp-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  display: inline-block;
  position: relative;
  padding-bottom: 12px;
}

.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::before {
  bottom: 0;
  width: clamp(72px, 68%, 124px);
  height: 3px;
  border-radius: var(--r-full);
  background: var(--accent-gradient);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  animation: sectionUnderlineGrow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.section-title::after {
  bottom: -3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 25%, transparent 26%),
    radial-gradient(circle, color-mix(in srgb, var(--accent-2) 78%, white) 0 58%, transparent 59%);
  opacity: 0;
  filter: blur(0.2px);
  animation: sectionUnderlineSpark 1.15s ease-out 0.35s forwards;
}

@keyframes sectionUnderlineGrow {
  0% {
    transform: translateX(-50%) scaleX(0);
    opacity: 0.35;
  }
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
  }
}

@keyframes sectionUnderlineSpark {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.3);
  }
  18% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  60% {
    opacity: 0.95;
    transform: translateX(calc(-50% + 28px)) scale(0.68);
  }
  100% {
    opacity: 0;
    transform: translateX(calc(-50% + 42px)) scale(0.2);
  }
}

/* -- BUTTONS -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 12px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base), border-color var(--t-base), color var(--t-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.btn:hover::after { opacity: 0.08; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 3px 10px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-1);
  border: 2px solid var(--border);
}
.btn-ghost:hover {
  background: var(--accent-glow);
  border-color: var(--accent-1);
  transform: translateY(-1px);
}

.btn-lg { padding: 15px 36px; font-size: 0.95rem; }

.btn-full { width: 100%; justify-content: center; }

/* -- TAGS ------------------------------------------------ */
.tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--label-bg);
  color: var(--label-color);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base), color var(--t-base);
}

/* -- ANIMATE ON SCROLL ---------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
[data-animate].in-view {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------
   4. NAVBAR
-------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  padding-block: var(--sp-2);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  transition: background var(--t-slow), border-color var(--t-base), box-shadow var(--t-base);
}

.navbar.scrolled {
  border-bottom-color: var(--nav-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

/* Logo */
.nav-logo { display: flex; align-items: center; }
.logo-box {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 8px var(--accent-glow);
  transition: transform var(--t-spring), box-shadow var(--t-base);
}
.nav-logo:hover .logo-box {
  transform: rotate(-4deg) scale(1.04);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: 0;
  margin-right: auto;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-base), background var(--t-base);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--t-spring);
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent-1);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Theme toggle */
.theme-toggle { display: flex; align-items: center; }

.toggle-track {
  display: flex;
  align-items: center;
  width: 52px;
  height: 28px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--r-full);
  padding: 3px;
  cursor: pointer;
  transition: background var(--t-slow), border-color var(--t-base);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.08);
}

.toggle-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.6rem;
  transition: transform var(--t-spring), box-shadow var(--t-base);
  box-shadow: 0 1px 4px var(--accent-glow);
}

[data-theme="light"] .toggle-thumb { transform: translateX(0); }
[data-theme="dark"] .toggle-thumb  { transform: translateX(24px); }

.sun-icon  { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon  { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--t-base);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------
   5. HERO SECTION
-------------------------------------------------------- */
.hero {
  min-height: min(780px, 100svh);
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 84px;
  padding-bottom: clamp(24px, 5vw, 48px);
  overflow: hidden;
}

/* Decorative blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite;
}
.hero-blob--1 {
  width: 600px; height: 600px;
  background: var(--blob-1);
  top: -150px; right: -150px;
  animation-delay: 0s;
}
.hero-blob--2 {
  width: 400px; height: 400px;
  background: var(--blob-2);
  bottom: -100px; left: -100px;
  animation-delay: 3s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(20px, -20px) scale(1.04); }
}

/* Grid lines background */
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  padding-block: clamp(12px, 2vw, 24px);
}

/* -- Hero Text -- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  backdrop-filter: blur(10px);
}
.badge-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0.1); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  line-height: 1.02;
  color: var(--text-primary);
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--sp-2);
  padding-right: 0;
}
.hero-name em {
  font-style: normal;
  font-weight: 800;
  display: inline-block;
  line-height: 1.08;
  padding-bottom: 0.08em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background var(--t-base), filter var(--t-base);
}

.hero-name:hover em {
  background: linear-gradient(135deg, #bf0bdf 0%, #ee219c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.08));
}

.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 2rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.role-cursor {
  color: var(--accent-1);
  display: inline-block;
  width: 0.45em;
  text-align: center;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.72;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base), border-color var(--t-base), color var(--t-base);
  box-shadow: var(--shadow-sm);
}
.social-link:hover {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 5px 12px var(--accent-glow);
}

/* -- Hero Image -- */
.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(100%, 520px);
  min-height: 520px;
  margin-inline: auto;
  isolation: isolate;
}

.hero-image-ring {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 1.5px dashed var(--border);
  animation: spin 25s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-image-card {
  width: 300px; height: 300px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-xl);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translateY(12px);
}

.hero-image-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0.06;
}

.hero-image-wrap:hover .hero-image-card {
  transform: scale(1.01);
  box-shadow: 0 14px 30px var(--accent-glow);
}

.hero-avatar {
  width: 260px; height: 260px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.avatar-initials {
  font-family: var(--font-display);
  font-size: 5rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Floating badges */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  padding: 10px 16px;
  border-radius: var(--r-lg);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  z-index: 2;
}
.float-badge--figma {
  top: 120px;
  left: 8px;
  animation: orbitFloat 4.2s ease-in-out infinite;
  color: var(--accent-1);
}
.float-badge--data {
  top: 92px;
  right: 20px;
  animation: orbitFloat 4.5s ease-in-out infinite 0.8s;
  color: var(--accent-2);
}
.float-badge--Operations {
  bottom: 110px;
  right: 12px;
  animation: orbitFloat 4.8s ease-in-out infinite 1.4s;
  color: var(--accent-3);
}
@keyframes orbitFloat {
  0%,100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -10px, 0); }
}


@keyframes scrollPulse {
  0%,100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: 0.4; transform: scaleY(0.6); }
}

/* --------------------------------------------------------
   6. ABOUT SECTION
-------------------------------------------------------- */
.about {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(34px, 4.2vw, 52px);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.07), transparent 24%),
    radial-gradient(circle at 84% 80%, rgba(8, 145, 178, 0.08), transparent 22%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-secondary) 84%, transparent), color-mix(in srgb, var(--bg-primary) 68%, transparent));
}

.about .section-header {
  margin-bottom: clamp(18px, 2.6vw, 28px);
}

.about .container {
  position: relative;
  z-index: 1;
}

.about::before,
.about::after {
  content: '';
  position: absolute;
  opacity: 0.42;
  pointer-events: none;
  z-index: -1;
}

.about::before {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -110px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-1) 18%, transparent), transparent 68%);
  filter: blur(14px);
}

.about::after {
  width: 420px;
  height: 420px;
  right: -140px;
  bottom: -110px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%);
  filter: blur(18px);
}

.about-hexagons {
  display: none;
}

.about-grid {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid color-mix(in srgb, var(--border-card) 78%, var(--accent-1));
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 94%, var(--accent-1)), color-mix(in srgb, var(--bg-secondary) 88%, var(--accent-2)));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.about-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--accent-1) 12%, transparent), transparent 34%), radial-gradient(circle at 88% 80%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 34%);
  pointer-events: none;
  z-index: -1;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 680px;
  margin: 0;
}

.about-lead {
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 40rem;
  text-align: left;
}

.about-text p:not(.about-lead) {
  color: var(--text-secondary);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 0;
  max-width: 40rem;
  text-align: left;
}

.about-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: clamp(20px, 2.5vw, 30px);
}

.about-tags .tag {
  position: relative;
  padding: 8px 9px;
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-card) 78%, transparent);
  border-color: color-mix(in srgb, var(--accent-1) 24%, var(--border-card));
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), color var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.about-tags .tag::before {
  content: '';
  position: absolute;
  inset: auto 14px 0 14px;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.about-tags .tag:hover {
  transform: translateY(-3px);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--accent-1) 55%, var(--border));
  box-shadow: var(--shadow-md);
}

.about-tags .tag:hover::before {
  transform: scaleX(1);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: none;
  justify-self: end;
  align-self: center;
  width: 100%;
}

.stat-card {
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-1) 22%, var(--border-card));
  border-radius: var(--r-lg);
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(12px);
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--t-base);
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent-1) 48%, var(--border));
}
.stat-card:hover::after { opacity: 1; }

.stat-icon {
  width: 46px; height: 46px;
  background: color-mix(in srgb, var(--accent-1) 12%, var(--label-bg));
  border: 1px solid color-mix(in srgb, var(--accent-1) 24%, transparent);
  border-radius: 15px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--accent-1);
  font-size: 0.98rem;
  transition: background var(--t-base), transform var(--t-spring);
}
.stat-card:hover .stat-icon {
  background: var(--accent-gradient);
  color: #fff;
  transform: scale(1.05) rotate(-3deg);
}

.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent-1);
  display: inline;
}
.stat-plus {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-2);
  font-weight: 800;
}
.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.35;
}

/* --------------------------------------------------------
   7. SKILLS / WHAT I DO
-------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  max-width: 1080px;
  margin-inline: auto;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
  width: 100%;
  text-align: center;
}

.skill-card-glow {
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
  border-radius: inherit;
}
.skill-card:hover .skill-card-glow { opacity: 0.04; }

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px var(--accent-glow);
  border-color: var(--border);
}

.skill-icon-wrap {
  width: 52px; height: 52px;
  background: var(--accent-gradient);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.3rem;
  margin: 0 auto 18px;
  box-shadow: 0 4px 10px var(--accent-glow);
  transition: transform var(--t-spring);
}
.skill-card:hover .skill-icon-wrap {
  transform: scale(1.05) rotate(-3deg);
}

.skill-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--sp-3);
  max-width: 30ch;
  min-height: 4.95em;
  margin-inline: auto;
}

/* Progress bars */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  width: 100%;
  text-align: left;
}

.skill-bar-item { min-width: 0; }

.skill-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.skill-bar-label span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skill-bar-label span:last-child {
  flex: 0 0 auto;
}

.skill-bar-track {
  height: 6px;
  background: var(--track-bg);
  border-radius: var(--r-full);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--r-full);
  width: 0;
  transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: none;
}

/* --------------------------------------------------------
   8. PORTFOLIO
-------------------------------------------------------- */
.portfolio {
  background: var(--bg-secondary);
}

/* Filter buttons */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 22px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  transition: transform var(--t-base), box-shadow var(--t-base), background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.filter-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}
.filter-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px var(--accent-glow);
}

/* Portfolio grid */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 1080px;
  margin-inline: auto;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base);
  display: flex;
  flex-direction: column;
  flex: 0 1 calc((100% - 36px) / 3);
  max-width: calc((100% - 36px) / 3);
  min-height: 410px;
}
.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border);
}

.portfolio-card.hidden {
  display: none;
}
/* Netlify spam protection */
.netlify-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Netlify spam protection */
.netlify-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.portfolio-img-wrap {
  position: relative;
  overflow: hidden;
  height: auto;
  aspect-ratio: 16 / 10;
  flex: 0 0 auto;
}

/* Colorful project image placeholders */
.portfolio-img {
  width: 100%; height: 100%;
  transition: transform var(--t-slow);
}
.portfolio-img:is(img) { object-fit: cover; }
.portfolio-card:hover .portfolio-img { transform: scale(1.06); }

.portfolio-img--1 { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #0891b2 100%); }
.portfolio-img--2 { background: linear-gradient(135deg, #0c2340 0%, #1d4ed8 40%, #7c3aed 100%); }
.portfolio-img--3 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.portfolio-img--4 { background: linear-gradient(135deg, #134e4a 0%, #0891b2 50%, #2563eb 100%); }
.portfolio-img--5 { background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #7c3aed 100%); }
.portfolio-img--6 { background: linear-gradient(135deg, #082f49 0%, #0369a1 50%, #06b6d4 100%); }

/* Inner decorative content for placeholders */
.portfolio-img::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  top: 20%; left: 20%;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,0.1);
}
.portfolio-img::after {
  content: '';
  position: absolute;
  width: 30%;
  height: 30%;
  top: 10%; right: 10%;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

/* Overlay */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 23, 48, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-base);
  backdrop-filter: blur(4px);
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

.overlay-link {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--accent-1);
  font-size: 1rem;
  transform: scale(0.7);
  transition: transform var(--t-spring);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.portfolio-card:hover .overlay-link { transform: scale(1); }
.overlay-link--disabled { cursor: default; }

/* Card info */
.portfolio-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  text-align: center;
}

.portfolio-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  min-height: 2.4em;
}

.portfolio-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-2);
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  min-height: 42px;
  align-content: flex-start;
  justify-content: center;
}

.ptag {
  padding: 3px 9px;
  background: var(--label-bg);
  color: var(--label-color);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* --------------------------------------------------------
   9. EXPERIENCE SECTION
-------------------------------------------------------- */
.experience {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-primary) 78%, var(--bg-secondary)), var(--bg-secondary));
  overflow: hidden;
}

.experience::before {
  content: '';
  position: absolute;
  inset: auto -100px -80px auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%);
  opacity: 0.8;
  filter: blur(54px);
  pointer-events: none;
}

.experience-layout {
  max-width: 980px;
  margin: clamp(8px, 1.5vw, 16px) auto 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid color-mix(in srgb, var(--border) 42%, transparent);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.88), rgba(255,255,255,0.62)),
    var(--bg-secondary);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.experience-intro {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
}

.experience-panel-title {
  max-width: 42rem;
  margin: 0 auto 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.45;
}

.experience-panel-text {
  max-width: 62ch;
  margin-inline: auto;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.experience-timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 0;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 13px;
  width: 2px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent-1) 42%, var(--border)), transparent);
}

.experience-entry {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.experience-marker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.experience-marker-dot {
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent-2);
  border-radius: 50%;
  background: var(--bg-secondary);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent-2) 14%, transparent);
}

.experience-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  border: 1px solid color-mix(in srgb, var(--border-card) 70%, var(--border));
  border-radius: 22px;
  background:
    linear-gradient(140deg, rgba(255,255,255,0.36), transparent 44%),
    var(--bg-card);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.experience-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent-gradient);
}

.experience-card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow-xl);
}

.experience-card-head {
  margin-bottom: 12px;
}

.experience-date {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--accent-1);
  background: var(--label-bg);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.experience-company-name {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.experience-company-name i {
  margin-right: 7px;
  color: var(--accent-1);
  font-size: 0.92em;
}

.experience-role {
  margin-top: 4px;
  color: var(--accent-1);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.experience-role span {
  color: var(--text-secondary);
  font-weight: 600;
}

.experience-responsibilities {
  display: grid;
  gap: 7px;
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}

.experience-responsibilities li {
  position: relative;
  padding-left: 17px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.55;
}

.experience-responsibilities li::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 12%, transparent);
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.experience-tags .tag {
  position: relative;
  overflow: hidden;
  padding: 5px 10px;
  border-color: color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  font-size: 0.66rem;
  font-weight: 700;
}

.experience-tags .tag::before {
  content: '';
  position: absolute;
  inset: auto 10px 0;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.experience-tags .tag:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--accent-1) 32%, var(--border));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.experience-tags .tag:hover::before { transform: scaleX(1); }

@media (max-width: 768px) {
  .experience-layout {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .experience-entry {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
  }

  .experience-timeline::before { left: 10px; }

  .experience-card { padding: 18px 18px 16px; }
}

@media (max-width: 480px) {
  .experience-layout {
    padding: 18px 14px;
    border-radius: 22px;
  }

  .experience-intro { margin-bottom: 24px; }

  .experience-panel-title { font-size: 1.12rem; }

  .experience-panel-text,
  .experience-responsibilities li { font-size: 0.84rem; line-height: 1.55; }

  .experience-card {
    padding: 16px 16px 15px;
    border-radius: 20px;
  }

  .experience-company-name { font-size: 1rem; }
  .experience-role { font-size: 0.8rem; }
  .experience-tags { gap: 6px; }
  .experience-tags .tag { padding: 5px 9px; font-size: 0.62rem; }
}

/* --------------------------------------------------------
   10. CONTACT SECTION
-------------------------------------------------------- */
.contact {
  background: var(--bg-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.contact-item-icon {
  width: 44px; height: 44px;
  min-width: 44px;
  background: var(--label-bg);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--accent-1);
  font-size: 0.95rem;
  transition: background var(--t-spring), transform var(--t-spring);
}
.contact-item:hover .contact-item-icon {
  background: var(--accent-gradient);
  color: #fff;
  transform: scale(1.05) rotate(-3deg);
}

.contact-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.contact-social {
  display: flex;
  gap: var(--sp-1);
}

/* Form */
.contact-form-wrap {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06)),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.contact-form-wrap::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 70%);
  pointer-events: none;
}

.contact-form-wrap::after {
  content: '';
  position: absolute;
  inset: auto 0 0 auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.12), transparent 72%);
  pointer-events: none;
}

.contact-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

/* Floating label inputs */
.form-field {
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 24px 18px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-slow), transform var(--t-base);
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

/* Floating label */
.form-field label {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
  transition: all var(--t-base);
  background: transparent;
  padding-inline: 6px;
}

/* Textarea label starts at top */
.form-field:has(textarea) label {
  top: 24px;
  transform: none;
}

/* Float up on focus or when input has content */
.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label {
  top: 7px;
  transform: none;
  font-size: 0.68rem;
  color: var(--accent-1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
}


.form-field input:focus ~ .field-line,
.form-field textarea:focus ~ .field-line {
  width: calc(100% - 36px);
}

/* Submit btn icon animation */
.btn .btn-icon {
  transition: transform var(--t-spring);
}
.btn:hover .btn-icon {
  transform: translateX(4px) translateY(-2px);
}

/* -- DARK MODE SURFACE REFINEMENTS ---------------------- */
[data-theme="dark"] .experience-layout {
  background: linear-gradient(145deg, rgba(20, 36, 61, 0.96), rgba(16, 29, 51, 0.96));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .experience-card {
  background: linear-gradient(140deg, rgba(31, 52, 82, 0.68), rgba(20, 36, 61, 0.96) 48%), var(--bg-card);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .experience-card:hover {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .contact-form-wrap {
  background: linear-gradient(145deg, rgba(20, 36, 61, 0.96), rgba(16, 29, 51, 0.96));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea {
  background: #172940;
  border-color: rgba(148, 163, 184, 0.22);
  color: var(--text-primary);
  caret-color: var(--accent-2);
}

[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field textarea:focus {
  background: #1b304b;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 199, 232, 0.14);
}

[data-theme="dark"] .form-field input::placeholder,
[data-theme="dark"] .form-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

[data-theme="dark"] .form-field input:-webkit-autofill,
[data-theme="dark"] .form-field input:-webkit-autofill:hover,
[data-theme="dark"] .form-field input:-webkit-autofill:focus,
[data-theme="dark"] .form-field textarea:-webkit-autofill,
[data-theme="dark"] .form-field textarea:-webkit-autofill:hover,
[data-theme="dark"] .form-field textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px #172940 inset;
  caret-color: var(--accent-2);
}

[data-theme="dark"] .form-field input:focus ~ label,
[data-theme="dark"] .form-field input:not(:placeholder-shown) ~ label,
[data-theme="dark"] .form-field textarea:focus ~ label,
[data-theme="dark"] .form-field textarea:not(:placeholder-shown) ~ label {
  background: #172940;
}

/* --------------------------------------------------------
   11. FOOTER
-------------------------------------------------------- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-card);
  padding-block: 14px;
}

.footer-logo .logo-image {
  width: 60px;
  height: 60px;
  display: block;
  object-fit: contain;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.footer-brand-copy {
  min-width: 0;
}

.footer-name {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: nowrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-3);
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--t-base);
}
.footer-links a:hover { color: var(--accent-1); }

/* --------------------------------------------------------
   12. BACK TO TOP
-------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px var(--accent-glow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: transform var(--t-base), box-shadow var(--t-base), opacity var(--t-base);
  z-index: 999;
  border: 2px solid rgba(255,255,255,0.2);
}
.back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: all;
}
.back-to-top:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 16px var(--accent-glow);
}

/* --------------------------------------------------------
   13. RESPONSIVE DESIGN
-------------------------------------------------------- */

/* -- TABLET (= 1024px) -------------------------------- */
@media (max-width: 1024px) {
  :root {
    --section-space: clamp(42px, 7vw, 60px);
    --section-gap: clamp(20px, 3vw, 30px);
  }

  .nav-cta { display: none; }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .portfolio-grid {
    justify-content: center;
  }

  .portfolio-card {
    flex-basis: calc((100% - 18px) / 2);
    max-width: calc((100% - 18px) / 2);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: clamp(24px, 5vw, 38px);
  }

  .about-text {
    padding: 0;
    max-width: none;
    margin: 0;
  }

  .about-lead,
  .about-text p:not(.about-lead) {
    max-width: none;
  }

  .stats-grid {
    justify-self: stretch;
    max-width: none;
  }

  .experience-intro {
    max-width: 760px;
    text-align: center;
    margin-inline: auto;
  }

  .experience-panel-title,
  .experience-panel-text {
    max-width: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 20px;
  }

  .footer-links {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* -- SMALL TABLET (= 768px) --------------------------- */
@media (max-width: 768px) {
  :root {
    --sp-16: 80px;
    --section-space: 38px;
    --section-gap: 20px;
  }

  /* Navbar */
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--sp-8) var(--sp-5);
    gap: var(--sp-1);
    box-shadow: var(--shadow-xl);
    transition: right var(--t-slow);
    z-index: 998;
    border-left: 1px solid var(--border-card);
  }

  .nav-links.open { right: 0; }

  .nav-link {
    font-size: 1.1rem;
    padding: var(--sp-2) var(--sp-2);
    width: 100%;
  }

  .hamburger { display: flex; }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    padding-block: 8px;
  }

  .hero-text { order: 2; }
  .hero-image-wrap { order: 1; }

  .hero-desc { margin-inline: auto; }

  .hero-actions { justify-content: center; }
  .hero-social { justify-content: center; }

  .hero-image-wrap {
    min-height: 360px;
    width: 100%;
  }
  .hero-image-ring { width: 280px; height: 280px; }
  .hero-image-card { width: 220px; height: 220px; }
  .hero-avatar { width: 190px; height: 190px; }
  .avatar-initials { font-size: 3.5rem; }
  .float-badge {
    padding: 8px 12px;
    font-size: 0.72rem;
  }
  .float-badge--figma { top: 10px; left: 10px; }
  .float-badge--data { top: 22px; right: 0; }
  .float-badge--Operations { bottom: 18px; right: 18px; }

  /* About */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid {
    max-width: none;
    justify-self: stretch;
  }
  .stat-card { min-height: 150px; }
  .about-tags { gap: 10px; }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .skill-card { min-height: auto; }

  /* Portfolio */
  .portfolio-grid { justify-content: center; }
  .portfolio-card {
    flex-basis: 100%;
    max-width: 100%;
  }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
    gap: 6px;
  }

  .footer-brand-copy { text-align: center; }
  .footer-links { order: 2; justify-content: center; }
  .footer-copy { order: 3; }
}

@media (max-width: 680px) {
  .about-tags {
    flex-wrap: wrap;
    gap: 9px;
  }

  .about-tags .tag {
    padding: 9px 14px;
    font-size: 0.75rem;
  }
}

/* -- MOBILE (= 480px) --------------------------------- */
@media (max-width: 480px) {
  :root {
    --sp-16: 64px;
    --section-space: 30px;
    --section-gap: 18px;
  }

  .container { padding-inline: 14px; }

  .about-lead,
  .about-text p:not(.about-lead) {
    text-align: left;
    text-justify: auto;
  }

  .about-tags {
    flex-wrap: wrap;
    gap: 9px;
  }

  .about-tags .tag {
    padding: 9px 14px;
    font-size: 0.75rem;
  }

  .hero {
    min-height: auto;
    padding-top: 82px;
    padding-bottom: 18px;
  }

  .hero-name { font-size: 2.4rem; }
  .hero-role { font-size: 1rem; }

  .btn-lg { padding: 12px 24px; font-size: 0.875rem; }

  .hero-image-wrap {
    min-height: 310px;
  }
  .hero-image-ring { width: 240px; height: 240px; }
  .hero-image-card { width: 188px; height: 188px; }
  .float-badge { display: none; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2.2rem; }
  .stat-card {
    min-height: 140px;
    padding: 15px 13px 13px;
  }

  .back-to-top { bottom: 20px; right: 20px; }
}

/* -- MOBILE HERO ALIGNMENT (= 767px) ------------------- */
@media (max-width: 767px) {
  .hero-inner {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(14px, 4vw, 20px);
  }

  .hero-text {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-badge {
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-name {
    width: auto;
    max-width: 100%;
    text-align: center;
  }

  .hero-role {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .hero-role .role-text,
  .hero-desc {
    max-width: 100%;
  }

  .hero-desc {
    width: 100%;
    margin-inline: auto;
    text-align: center;
  }

  .hero-actions,
  .hero-social,
  .hero-image-wrap {
    width: 100%;
    justify-content: center;
    margin-inline: auto;
  }

  .hero-actions {
    align-items: center;
    text-align: center;
  }

  .hero-social {
    flex-wrap: wrap;
  }

  .hero-image-wrap {
    justify-self: center;
  }
}

